import { AjaxUtil } from 'utils/AjaxUtil'
import { API_CONSTANT } from 'utils/ApiConstant'
import { LoginUserInfo, SystemMenuType } from '@/system'

export interface LoginParamType {
  username: string
  pwd: string
}
export interface LoginResultType {
  token: string
}

const url = ''
export const LoginService = {
  login(param: LoginParamType): Promise<LoginResultType> {
    return AjaxUtil.postReq(API_CONSTANT.login, param)
  },
  loadLoginUserInfo(): Promise<LoginUserInfo> {
    return AjaxUtil.postReq(API_CONSTANT.login_user_info)
  },
}
